case "${AUTOPKGTEST_REBOOT_MARK:-}" in
"")
- # Need to disable gpg verification for test builds
- sed -i -e 's,gpg-verify=true,gpg-verify=false,' /etc/ostree/remotes.d/*.conf
+ # Need to disable gpg verification for test builds.
+ # On container-native FCOS there may be no remotes.d conf files.
+ for conf in /etc/ostree/remotes.d/*.conf; do
+ if test -f "$conf"; then
+ sed -i -e 's,gpg-verify=true,gpg-verify=false,' "$conf"
+ fi
+ done
# xref https://github.com/coreos/coreos-assembler/pull/2814
systemctl mask --now zincati
case "${AUTOPKGTEST_REBOOT_MARK:-}" in
"")
- # Need to disable gpg verification for test builds
- sed -i -e 's,gpg-verify=true,gpg-verify=false,' /etc/ostree/remotes.d/*.conf
+ # Need to disable gpg verification for test builds.
+ # On container-native FCOS there may be no remotes.d conf files.
+ for conf in /etc/ostree/remotes.d/*.conf; do
+ if test -f "$conf"; then
+ sed -i -e 's,gpg-verify=true,gpg-verify=false,' "$conf"
+ fi
+ done
# Test our generator
test -f /run/systemd/generator/local-fs.target.requires/ostree-remount.service
ostree remote list > remotes.txt
if ! test -s remotes.txt; then
+ # On container-native FCOS, there are no ostree remotes — that's expected.
+ # On traditional ostree systems, missing remotes is a real regression.
+ if [ "$(rpmostree_query_json '.deployments[0]."container-image-reference" // empty')" != "" ]; then
+ echo "No ostree remotes found; skipping test on container-native system"
+ exit 0
+ fi
assert_not_reached "no ostree remotes"
fi
date